By train
Sasebo, the terminating station on the JR Omura Line, is the westernmost point on the entire Japan Railway.
Sasebo is connected to Hakata station, the last stop on the San'yo Shinkansen in Fukuoka, by the Midori limited express train. The train reaches Sasebo in 1 3/4 hours, reversing direction at Haiki station, and the trip costs ¥3740 each way. For its price, it is probably of use only to Japan Rail Pass holders where the train can be taken at no additional charge, or to passengers transferring from the Shinkansen.
Local trains from Hakata cost only ¥2070, but can take anywhere from 3 to 4 hours, requiring a multiple change of trains; in which case, you're better off using the bus see below. Taking the Midori Limited Express, a one-way ticket from Hakata to Sasebo cost ¥2500, return tickets cost ¥4500. The ride will only take about 1 hr and 47 minutes.
Sasebo is also connected to Nagasaki by the hourly Sea Side Liner rapid train 100 minutes, ¥1600.